#define _CRT_SECURE_NO_WARNINGS 1
#include<iostream>
#include<vector>
using namespace std;

class Solution {
public:
    int maxOperations(vector<int>& nums)
    {
        int count = 1;
        int score = nums[0] + nums[1];
        for (int i = 2; i + 1 < nums.size(); i += 2)
        {
            if (nums[i] + nums[i + 1] == score)
                count++;
            else
                break;
        }
        return count;
    }
};